<?php $this->load->view("admin/$adminCurrentTemplate/commonHead");?>
    	<ul>
        	<li class="guid">
            	<ul>
                    <li class="chkBox"><input type="checkbox" name="all" id="all" /></li>
                    <li class="create-time">创建时间</li>
                    <li class="index">排序索引</li>
                    <li class="cate">变量标题</li>
                    <li class="title">变量名称</li>
                </ul>
            </li>
            <form name="listForm" id="listForm" method="post" action="<?php echo $phpSelf;?>">
            <input type="hidden" name="del" id="del" value="" />
            <input type="hidden" name="active" id="active" value="" />
            <?php 
            if(count($configList)>0){
            	foreach($configList as $item):
            ?>            
        	<li class="item">
            	<ul>
            		<li class="chkBox"><input type="checkbox" name="id[]" id="id_<?=$item->id?>" class="id-checkbox" value="<?=$item->id?>" /></li>
                    <li class="create-time" title="<?php echo date('Y-m-d h:m:s',strtotime($item->createTime));?>"><?=date('Y-m-d',strtotime($item->createTime));?></li>
                    <li class="index"><input type="text" name="index" id="index_<?=$item->id?>" value="<?=$item->oIndex?>" class="index-input" /></li>
                    <li class="cate" title="<?php echo $item->title?>"><?php echo $item->title?></li>
                    <li class="title" title='<?php echo $item->name.'='.$item->value?>'><?=$item->name?></li>
                    <li class="single-menu"><a href="#" title="修改" class="edit">修改</a><a href="#" title="删除" class="del">删除</a></li>
                </ul>
            </li>
            <?php endforeach;?>
            <div class="apptend-container hide"></div>
            </form>
            <li class="page">
            	<?php echo $this->pagination->create_links();?>
            </li>
            <?php }else{?>
            <div class="apptend-container hide"></div>
            </form>
            <li class='no-list'>对不起，暂无数据！</li>
            <?php }?>
        </ul>
<div class="searchBox hide">
	<div class="search-box-row">
		<span class="guid">启用状态：</span>
		<span class="formItem">
			<input type="radio" name='disabled' id='disabled_' value=''<?php if(strlen($rDisabled)==0) echo " checked='checked'";?> /><label for='disabled_'>所有</label>
			<input type="radio" name='disabled' id='disabled_0' value="0"<?php if($rDisabled=='0' && strlen($rDisabled)>0) echo "checked='checked'";?> /><label for="disabled_0">启用</label>
			<input type='radio' name='disabled' id='disabled_1' value='1'<?php if($rDisabled=='1') echo "checked='checked'";?> /><label for="disabled_1">禁用</label>
		</span>
	</div>
	<div class="search-box-row">
		<span class="guid">变量标题：</span>
		<span class="formItem"><input type="text" name="title" id="title" value="<?php if(isset($rTitle)) echo $rTitle;?>" class="txtBox" /></span>
	</div>
	<div class="search-box-row">
		<span class="guid">变量名称：</span>
		<span class="formItem"><input type="text" name="name" id="name" value="<?php if(isset($rName)) echo $rName;?>" class="txtBox" /></span>
	</div>
	<div class="search-box-row">
		<span class="guid">添加时间：</span>
		<span class="formItem"><input type="text" name="createTimeStart" id="createTimeStart" value="<?php if(isset($rCreateTimeStart)) echo $rCreateTimeStart;?>" class="timeBox" onClick="WdatePicker();" readonly="readonly" /><label>至</label><input type="text" name="createTimeEnd" id="createTimeEnd" value="<?php if(isset($rCreateTimeEnd)) echo $rCreateTimeEnd;?>" class="timeBox" onClick="WdatePicker();" readonly="readonly" /></span>
	</div>
</div>
<script type="text/javascript">
var editWidth = 600;
var editHeight = 414;
var searchWidth = 315;
var searchHeight = 179;
$(function(){
	$('.apptend-container').html($('.searchBox').html());
});
</script>
<?php $this->load->view("admin/$adminCurrentTemplate/commonFoot");?>

<script type="text/javascript">
$(function(){
	var page_disabled = $('.apptend-container input[name="disabled"]:checked').val();
	var page_name = $('.apptend-container #name').val();
	var page_title = $('.apptend-container #title').val();
	var page_createTimeStart = $('.apptend-container #createTimeStart').val();	
	var page_createTimeEnd = $('.apptend-container #createTimeEnd').val();
	var paramSplit = '&';
	var paramString = '';
	
	if(page_disabled.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'disabled=' + page_disabled;
	}
	
	if(page_name.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'name=' + page_name;
	}
	
	if(page_title.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'title=' + page_title;
	}
	
	if(page_createTimeStart.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'createTimeStart=' + page_createTimeStart;
	}
	
	if(page_createTimeEnd.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'createTimeEnd=' + page_createTimeEnd;
	}
	
	$('.page a').each(function(){
		var self = $(this);
		var selfHref = self.attr('href');
		if(paramString.length>0){
			self.attr('href',selfHref + '?' + paramString);
		}
	});
});
</script>